import request from '@/config/axios'

export interface MemberLevelVO {
  id: number
  no: string
  name: string
  memberNum: number
  modifyTime: Date
  status: byte
}

// 查询相亲会员等级列表
export const getMemberLevelPage = async (params) => {
  return await request.get({ url: `/blind/member-level/page`, params })
}

// 查询相亲会员等级详情
export const getMemberLevel = async (id: number) => {
  return await request.get({ url: `/blind/member-level/get?id=` + id })
}

// 新增相亲会员等级
export const createMemberLevel = async (data: MemberLevelVO) => {
  return await request.post({ url: `/blind/member-level/create`, data })
}

// 修改相亲会员等级
export const updateMemberLevel = async (data: MemberLevelVO) => {
  return await request.put({ url: `/blind/member-level/update`, data })
}

// 删除相亲会员等级
export const deleteMemberLevel = async (id: number) => {
  return await request.delete({ url: `/blind/member-level/delete?id=` + id })
}

// 导出相亲会员等级 Excel
export const exportMemberLevel = async (params) => {
  return await request.download({ url: `/blind/member-level/export-excel`, params })
}

// 查询相亲会员等级列表
export const getMemberPrivilegePage = async (params) => {
  return await request.get({ url: `/blind/member-privilege/page`, params })
}

// 查询相亲会员特权详情
export const getMemberPrivilege = async (id: number) => {
  return await request.get({ url: `/blind/member-privilege/get?id=` + id })
}

// 查询相亲会员等级机制列表
export const getMemberMechanismPage = async (params) => {
  return await request.get({ url: `/blind/member-mechanism/page`, params })
}